/*
 * @Author: veggieg8 
 * @Date: 2018-03-08 17:48:58 
 * @exp : 首页js文件，引入Swiper组件
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2018-05-22 15:26:56
 */
import Vue from 'vue'
import myHeader from '../../components/Header';
import myFooter from '../../components/Footer';
import centerHeader from '../../components/center-header';
import Swiper from '../../../static/js/swiper-4.1.6.min.js'
export default {

    components: {
        myHeader,
        myFooter,
        centerHeader
    },
    data() {
        return {
            checkedMsg: 1,
            img_list: [{
                    id: 1,
                    img: "http://lhslumenadmin.anasit.com/loop/image/2d6213373860bbaa1bb1f3d1b8193b94.jpg",
                    url: "http://www.baidu.com"
                },
                // {
                //     id: 2,
                //     img: "../../../components/images/img/banner-one.png",
                //     url: "http://www.baidu.com"
                // }
            ],
            enterpriseList: [],
            demo06_index: 0,
            informationActiveName: 'first',
            activityActiveName: 'first',
            databaseActiveName: 'first',
        }
    },
    mounted: function() {
        this.onInt();
    },
    methods: {
        onIndexChange(index) {
            this.demo06_index = index
        },
        //初始化企业推荐的轮播组件
        onInt: function() {
            var mySwiper = new Swiper('.swiper-container', {
                autoplay: true,
                slidesPerView: 6,
                spaceBetween: 15,
                // direction: 'vertical',
                loop: true,
                // 如果需要前进后退按钮
                navigation: {
                    nextEl: '.swiper-button-next',
                    prevEl: '.swiper-button-prev',
                    clickable: true,
                },

            })
        },
        handleClick(tab, event) {
            console.log(tab, event);
        },
        toEnterprise: function() {
            this.$router.push({ path: 'enterprise' })
        },
        datails:function(){
            this.$router.push({path:'datail'})
        },
        activity:function(){
            this.$router.push({path:'activity'})
        }
    },
}